<template>
	<view class="scan-code b-box">
		<!-- 扫码 -->
		<view
			class="w-750 b-box d-flex flex-cr"
			style="background-color:rgba(0,0,0,.5);"
			:style="{ height: navHeight }"
		>
			<view class="d-flex flex-r ali-i-c just-s" :style="{ height: titHeight }" >
				<view style="width: 60rpx;" class="d-flex flex-r ali-i-c just-e" >
					<view
					@click="Back"
						style="width: 17rpx;height: 17rpx;border-top:  5rpx solid #ffffff;border-left: 5rpx solid #ffffff;transform: rotate(-45deg);z-index: 9999;" 
					></view>
				</view>
				<view class="d-flex flex-r ali-i-c just-c" style="flex: 1;">
					<text class="pf-sc fw-600 c-fff po-re" style="font-size:34rpx;right:30rpx">扫码核销</text>
				</view>
			</view>
		</view>
		<view
			class=" w-750 b-box  bg-fa po-re d-flex flex-r ali-i-c just-c"
			style="background-color:rgba(0,0,0,.5);"
			:style="{ height: containerHeight }"
		>
			<view class="po-re" style="bottom:100rpx"><kingScan scanMode="scanCode"></kingScan></view>
		</view>
	</view>
</template>

<script>
import kingScan from '@/components/king-scan/king-scan';
import { _containerHeight, _statusBarHeight, _navHeight } from '@/utils/GetSys.js';
import { RequestRefre } from '@/utils/RefreBySource.js';
export default {
	components: {
		kingScan
	},
	data() {
		return {
			containerHeight: '',
			navHeight: '',
			titHeight: ''
		};
	},
	methods: {
		Back() {
			console.log(123);
			RequestRefre('OriginRefre');
      uni.switchTab({
      	url:'/pages/UserHomePage/UserHomePage'
      })
		}
	},
	onLoad() {
		this.containerHeight = _containerHeight();
		this.navHeight = _navHeight() + _statusBarHeight() + 'px';
		this.titHeight = _navHeight() + 'px';
		uni.hideLoading();
	},
	onShow() {
		RequestRefre('OriginRefre');
		uni.hideLoading();
	}
};
</script>

<style lang="scss"></style>
